1. Field of the Invention
The present invention relates to an autofocus control method for carrying out focus adjustment automatically in an image pickup device.
2. Description of Related Art
Recent years have seen the increasing prevalence of mobile telephones having camera functions, i.e., camera-equipped mobile phones. Since a camera device incorporated in such a mobile phone is required to allow easy shooting, an autofocus function is provided therein in common design. In shooting operation of a camera-equipped mobile phone, when a user orients a camera lens thereof to the subject of interest in a scene, focus adjustment is carried out automatically. Then, pressing a shutter button thereof enables the user to obtain image data with the subject of interest being in focus.
In execution of automatic focus adjustment, a moving lens is shifted continuously or intermittently. More specifically, at certain time intervals, high-frequency components are extracted from a luminance signal of an image formed on an image sensor through the lens, and these high-frequency components thus extracted are subjected to numerical integration with respect to the entire image pickup area. Thus, an average contrast value of the image on the entire image pickup area is obtained, and the lens position is fine-adjusted to maximize the contrast value. In this manner, the best focus position is determined through automatic focus adjustment.
The above-mentioned arrangement for automatic focus adjustment is based on the conventional image sensor (CCD/CMOS) design condition that the number of pixels in an image sensor is relatively small due to a relatively low degree of circuit integration density. Thus, it has been allowed to attain a satisfactory level of autofocus performance through contrast value evaluation on the entire image pickup area.
With recent rapid advances in image sensor (CCD/CMOS) technology, the number of pixels in an image sensor has been increased significantly, and it has been desired to provide a further advanced function for automatic focus adjustment that is available through an easy shooting procedure. To meet such a demand, a camera having a face detecting function has been proposed in Japanese Unexamined Patent Publication No. 2006-208443 and Japanese Unexamined Patent Publication No. 2008-299164, for example. In the disclosure of either of these Japanese Unexamined Patent Publication No. 2006-208443 and Japanese Unexamined Patent Publication No. 2008-299164, there is described a technique for focus adjustment wherein a region of a subject person's face in a scene being taken is set up as a focus area 10 as shown in FIG. 15, and an in-focus position is determined based on face image contrast data in lens shifting operation. That is, the subject of interest is recognized automatically, and the lens position is controlled so as to provide an in-focus state in a particular region of the image pickup area concerned as mentioned above. Thus, it is possible to obtain a clear, sharp picture image with the subject of interest being in focus.
However, in a situation where the subject person of interest is backlit or wears a mask/sunglasses, there is a high degree of probability that face detection may fail. On occurrence of a failure in face detection, focus adjustment is performed with respect to the entire image pickup area in common recovery processing, thus resulting in a picture image without focusing on the subject of interest to the user. That is, in shooting the subject person against a distant background, a failure in face detection will cause focus adjustment to be performed optimally with respect to the entire image pickup area regardless of the user's intention to focus on the subject person located at a near position. Consequently, the distant background will be brought into focus to cause blurry imaging of the subject person located at the near position.
In another conventional technique for focus adjustment, based on the presumption that the subject person of interest is located centrally on the image pickup area concerned in most shooting situations, a central region of the image pickup area (central region 11 shown in FIG. 16) is set up as a focus area on occurrence of a failure in face detection. Then, focus adjustment in recovery processing is carried out so as to provide a maximum contrast level on the central region 11. However, in a scene where two persons are standing side by side as shown in FIG. 16, if the central region 11 is set up as a focus area, a distant background is brought into focus while the subject persons of interest are out of focus.
In Japanese Unexamined Patent Publication No. Hei 6(1994)-6659 and Japanese Unexamined Publication No. 2007-133301, for example, there is disclosed a focus control method proposed as a technique for focusing on the subject persons of interest in an attempt to obviate the above-mentioned disadvantages. According to the focus control method disclosed in these documents, a plurality of focus areas 12A, 12B, and 12C are set up on the image pickup area concerned as exemplified in FIG. 17, and lens positions each corresponding to a maximum contrast value are acquired on the focus areas 12A, 12B, and 12C, respectively. Then, one of these lens positions is determined to provide an in-focus state on a particular one of the focus areas. Regarding on which focus area an in-focus state is to be provided in the operation mentioned above, there may be provided an arrangement wherein priorities of focusing are assigned to the focus areas in advance, wherein the subject located at the nearest position is brought into focus, or wherein the user selects a desired focus area while viewing the image pickup area concerned. For example, it is assumed here that, in shooting a scene of persons M1 and M2 standing side by side, the focus areas 12A, 12B, and 12C are set up as shown in FIG. 17. In the exemplary scene shown in FIG. 17, the person M1 on the left-hand side is in the left focus area 12A, and the person M2 on the right-hand side is in the right focus area 12C. There is no subject of interest in the central focus area 12B, i.e., a distant background is in the central focus area 12B. Referring to FIGS. 18A, 18B, and 18C, there are shown relationships of lens positions and contrast values obtained through calculations regarding the focus areas 12A, 12B, and 12C, respectively, under the above condition. On the focus area 12A, a peak of contrast is indicated at a lens position of focusing on the person M1 as shown in FIG. 18A. Similarly, on the focus area 12C, a peak of contrast is indicated at a lens position of focusing on the person M2 as shown in FIG. 18C. On the focus area 12B, a peak of contrast is indicated at a lens position of focusing on the distant background as shown in FIG. 18B. Hence, by shifting the lens position to point P control-wise so as to focus on the subject person located at the nearest position, it is possible to obtain a picture image with the subject persons being in focus. Through use of such a focus control method as mentioned above, the possibility of taking a picture image with the subjects being in focus can be increased positively.